export default {
	namespaced: true,
	state: {
		recommendList: JSON.parse(uni.getStorageSync('recommendList') || '[]'), 
		hotList: JSON.parse(uni.getStorageSync('hotList') || '[]'),	
		homeGoods:JSON.parse(uni.getStorageSync('homecategoods') || '[]'),	
	},
	mutations: {
		setRecommendList(state,data){
			try{
				uni.setStorageSync('recommendList', JSON.stringify(data))
				state.recommendList = data
			}catch(e){
			}
		},
		setHotList(state, data) {
			try{
				uni.setStorageSync('hotList', JSON.stringify(data))
				state.hotList = data
			}catch(e){
				console.log('用户数据错误')
			}
		},
		setHomeGoods(state, data) {
			try{
				uni.setStorageSync('homecategoods', JSON.stringify(data))
				state.homeGoods = data
			}catch(e){
				console.log('用户数据错误')
			}
		},
	},
	actions: {
		
	}
}